<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
>

<!-- 导入公有的header -->
<head th:include="common/head::header"/>

<body class="hold-transition skin-blue sidebar-mini">
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-6">
                <Irca:ircaButton text="执行截屏" onclick="reloadImg();" ico="fa fa-lock" continuity="false" class="btn btn-block btn-success btn-lg"></Irca:ircaButton>
            </div>
            <div class="col-md-6">
                <Irca:ircaButton text="截屏/并下载" onclick="cutScreenAndDownload();" ico="fa fa-lock" continuity="false" class="btn btn-block btn-info btn-lg"></Irca:ircaButton>
            </div>
            <!-- /.col -->
        </div>
        <div class="row">
            <div class="col-md-12">
                <img id="screenImg"  th:src="@{/jm/manager/screenCapture/getScreenshotImg}" width="100%" style="padding-top: 5px;"/>
            </div>
            <!-- /.col -->
        </div>
    </section>
    <!-- /.content -->
    <script type="application/javascript">
        function reloadImg() {
            var url = ctxPath + "/jm/manager/screenCapture/getScreenshotImg?date=" + new Date();
            $('#screenImg').attr('src',url);
        }
        function cutScreenAndDownload(){
            var url = ctxPath + "/jm/manager/screenCapture/getScreenshotImgAndDownLoad?date=" + new Date();
            window.location.href=url;
        }
    </script>
</body>
</html>
